//
//  AddFViewController.m
//  ShareSDKDemo
//
//  Created by mengte xu on 16/11/22.
//  Copyright © 2016年 mob.com. All rights reserved.
//

#import "AddFViewController.h"

@interface AddFViewController ()

@end

@implementation AddFViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setLeftButtonItems];
    UIImageView *titleImage=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]];
    self.navigationItem.titleView = titleImage;
    NSString *webString=[NSString stringWithFormat:@"http://www.fdcanet.com/index.php?app=find_password&appid=1&mobile=1"];
    UIWebView *webView=(UIWebView *)[self.view viewWithTag:1701];
    [webView setScalesPageToFit:YES];
    NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:webString]];
    [webView loadRequest:request];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)setLeftButtonItems{
    UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
    leftButton.frame = CGRectMake(0, 0, 44, 44);
    [leftButton addTarget:self action:@selector(goBack:) forControlEvents:UIControlEventTouchUpInside];
    [leftButton setImage:[UIImage imageNamed:@"icon_back.png"] forState:UIControlStateNormal];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
    self.navigationItem.leftBarButtonItem = leftItem;
}

- (void)goBack:(UIButton *)button
{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
